<?php

use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::post('register', 'AuthController@register')->name('register');
Route::post('login', 'AuthController@login')->name('login');
Route::post('logout', 'AuthController@logout')->name('logout');

Route::get('feedback', 'FeedbackController@index')->name('feedback');
Route::get('/', 'FeedbackController@index')->name('feedback');
Route::get('users', 'UserController@index')->name('users')->middleware('auth:web');

Route::group(['middleware' => 'auth:web'], function () {
    Route::get('feedback/create', 'FeedbackController@create')->name('feedback.create')->middleware('auth:web');
    Route::post('feedback', 'FeedbackController@store')->name('feedback.store')->middleware('auth:web');

    Route::post('users/{user_id}/block', 'UserController@block')->name('add-blacklist')->middleware('auth:web');
});

Route::get('db-structure/export', 'ExportController@export');

Route::get('test-webp', 'TestController@index');

